FROM registry.cn-hangzhou.aliyuncs.com/sherry/java:8-jdk232-with-skywaling-agent

MAINTAINER zhangln zhangln <zhangln@zhidianfan.com>

COPY ./mount-buzhou-service/target/mount-buzhou-service-*.jar /usr/app/mount-buzhou-service.jar

WORKDIR /usr/app

ENV TZ='Asia/Shanghai'
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
ENV JAVA_OPTS='-Xms1024m -Xmx1024m'

# Skywalking相关配置
ENV SW_AGENT_NAME='mount-buzhou'
ENV SAMPLE_N_PER_3_SECS=1500
ENV SW_AGENT_OPEN_DEBUG=false
ENV SW_LOGGING_MAX_HISTORY_FILES=1

#ENV JAVA_AGENT_OPTS='-javaagent:/skywalking/skywalking-agent.jar'

ENTRYPOINT java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap $JAVA_OPTS $JAVA_AGENT_OPTS -jar mount-buzhou-service.jar